<style lang="scss">
.container {
  background-color: #eee;
}
</style>

<template>
  <view class="container">
    <u-modal
      :model-value="alertShowIf"
      :content="descriptionWord"
      @confirm="confirm"
    ></u-modal>
  </view>
</template>

<script setup lang="ts">
import { toRef, ref, watch, onMounted } from 'vue'

const props = defineProps<{
  alertShow: boolean
  descriptionWord: string
  checkConfirm: boolean
}>()
const emits = defineEmits(['changeShowIf'])
const alertShowIf = toRef(props, 'alertShow')

function confirm() {
  emits('changeShowIf')
}

watch(
  () => props.alertShow,
  (value, oldValue) => {
    // console.log(value, oldValue)
  },
  { immediate: true },
)
</script>
